//
//  TWeekView.h
//  baohebao
//
//  Created by ming wang on 12-2-26.
//  Copyright (c) 2012年 mingrui. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyClass.h"


@protocol WeekViewDelegate;

@interface TWeekView : UIView {
	CFGregorianDate currentMonthDate;
	CFGregorianDate currentSelectDate;
	CFAbsoluteTime	currentTime;
	UIImageView* viewImageView;
	id<WeekViewDelegate> weekViewDelegate;
    NSMutableDictionary *monthFlagArray;   
}

@property (nonatomic,retain) NSMutableDictionary *monthFlagArray;
@property CFGregorianDate currentMonthDate;
@property CFGregorianDate currentSelectDate;
@property CFAbsoluteTime  currentTime;

@property (nonatomic, retain) UIImageView* viewImageView;
@property (nonatomic, assign) id<WeekViewDelegate>  weekViewDelegate;
-(int)getDayCountOfaMonth:(CFGregorianDate)date;
-(int)getMonthWeekday:(CFGregorianDate)date;
-(NSMutableArray*)getDayFlag:(NSString*)day;
-(void)clearAllDayFlag;
-(void)setDayFlag:(NSString*)day flag:(NSMutableArray*)flag;
- (void)movePrevMonth;
- (void)moveNextMonth;
-(NSString*)getStrDate;
-(void)goTaday;
-(int)getDayofWeek:(CFGregorianDate)date;
- (void) movePrevNext:(int)isPrev;
- (void) touchAtDate:(CGPoint) touchPoint;
@end



@protocol WeekViewDelegate<NSObject>
@optional
- (void) selectWeekDateChanged:(CFGregorianDate) selectDate;
- (void) WeekChanged:(CFGregorianDate) currentMonth viewLeftTop:(CGPoint)viewLeftTop height:(float)height;
- (void) beforeWeekChange:(TWeekView*) calendarView willto:(CFGregorianDate) currentMonth;
@end